<div class="bDiv" style="height: auto;">
    <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
        <table>
            <tbody>
            <volist name="goods" id="good" key="k" >
                <tr>
                    <td align="center" axis="col0">
                        <div style="width: 30px;">{$good.id}</div>
                    </td>
                    <td align="left" class="">
                        <div style="text-align: left; width: 50px;">
                            <if condition="$good['img'] neq ''">
                                <a href="{$good.img}" target="_blank">
                                    <img onMouseOver="$(this).attr('width','80').attr('height','45');" onMouseOut="$(this).attr('width','40').attr('height','30');" width="40" height="30" src="{$good.img}"/>
                                </a>
                            <else />
                                <a href="./Uploads/good/no.png" target="_blank">
                                    <img onMouseOver="$(this).attr('width','80').attr('height','45');" onMouseOut="$(this).attr('width','40').attr('height','30');" width="40" height="30" src="./Uploads/good/no.png"/>
                                </a>
                            </if>
                        </div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: left; width: 200px;">{$good.g_name}</div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 80px;">{$good.good_sn}</div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 80px;">{$good.b_name}</div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 100px;">{$good.c_name}</div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 100px;">{$good.shop_name}</div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 50px;">{$good.price}</div>
                    </td>

                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 50px;">
                            <if condition='$good[end_shelves] eq 1'>
                                <span style="color: green;">已通过</span>
                            <else />
                                <span style="color: red;">已下架</span>
                            </if>
                        </div>
                    </td>
                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 80px;">
                            {$good.stock} / {$good.all_stock}
                        </div>
                    </td>

                    <td align="center" axis="col0">
                        <div style="text-align: center; width: 160px;">
                          <a class="btn blue" href="{:U('Good/edit', array('id'=> $good['id']))}"><i class="fa fa-search"></i>查看</a>
                          <if condition="$good['end_shelves'] eq -1">
                            <a class="btn green" href="{:U('Good/end_shelves', array('id'=>$good['id']))}"><i class="fa fa-search"></i>通过</a>
                          <else/>
                            <a class="btn red" href="{:U('Good/off_shelf', array('id'=>$good['id']))}"><i class="fa fa-search"></i>下架</a>
                          </if>
                        </div>
                    </td>

                    <td align="" class="" style="width: 100%;">
                        <div>&nbsp;</div>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        {$page}
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        // 刷选条件 鼠标 移动进去 移出 样式
        $(".hDivBox > table > thead > tr > th.mhover").mousemove(function(){
            $(this).addClass('thOver');
        }).mouseout(function(){
            $(this).removeClass('thOver');
        });

        $(".pagination a").click(function(){
            cur_page = $(this).data('p');
            ajax_get_table(cur_page);
        });

        //点击下架弹出框
        $('.yes_a').click(function() {
            layer.open({
                type: 1,
                title: '下架原因',
                shadeClose: true,
                shade: 0.3,
                area: ['500px', '280px'],
                content: '<div style="text-align: center;width:80%;margin:0 auto;"><div style="height:50px;line-height:40px;">商品名称：<span id="g_id">1223</span></div><textarea id="content" style="width: 350px;height: 100px;"></textarea><div class="bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" id="submit_btn" style="margin-top:10px;">确认提交</a></div></div>',
            });
            var g_name = $(this).attr('g_name');
            $('#g_id').text(g_name);
        });

        //确认提交
        $(document).on('click', '#submit_btn', function() {
            alert('a');
            $.ajax({

            });
        });



    });
</script>